Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- 64 bit



  Be careful about nil check on interface in GoLang

nil check is frequently seen in GoLang code especially for error check since GoLang's special error handling convention. In most cases, nil check is straight forward, but in interface case, it's a bit different and special care needs to be taken. Take a look at below code snippet and guess what the output will be. package main import ( "bytes" "fmt" "io" ) func check(w io.Writer) { if w != nil { fmt.Println("w is not nil") } fmt.Printf("w is %+v\n", w) } func main() { var b *bytes.B...

   INTERFACE,GOLANG,NIL CHECK,NIL TYPE,NIL VALUE     2019-04-06 07:47:07

  Why Good Programmers Are Lazy and Dumb

I realized that, paradoxically enough, good programmers need to be both lazy and dumb. Lazy, because only lazy programmers will want to write the kind of tools that might replace them in the end. Lazy, because only a lazy programmer will avoid writing monotonous, repetitive code – thus avoiding redundancy, the enemy of software maintenance and flexible refactoring. Mostly, the tools and processes that come out of this endeavor fired by laziness will speed up the production. This ma...

   Good programmer,Lazy,Reason,Dumb     2012-04-18 07:15:23

  Global web browser market share statistic in June

The war among the leading web browsers is still on after Google Chrome took over IE as the No.1 web browser last month. Let's take a look at the market share for different web browsers in June 2012.According to statCounter.  Chrome still remains at the No. 1 position and its market share is continuously increasing. Its market share increases by 0.28% from 32.43% in May to 32.71% in June. While for IE, eve. though it lost its No. 1 position to Chrome last month, its market share still...

   Web browser, Market share,June,2012     2012-07-02 06:08:17

  How to check which Ohai plugin hangs in chef client run

Ohai plugins are very important components in chef client which aims to provide resource management automation on a server. The data discovered by Ohai plugins are describing the current state of the server and they will be used to maintain the server in a desired state. Each Ohai plugin discovers a specific pierce of information about the server such as cpu, memory, middleware etc. However, there are rare occasions(well I am a bit optimistic here) someone may find that the chef client...

   HOW TO,CHEF-CLIENT,OHAI,UPTIME,HANG     2017-12-24 22:09:59

  + operation on JavaScript objects

In JavaScript, there are two types of values: primitive and object. Primitives consist undefined, null, boolean, number and string. Other values such as array and function are objects. When applying + operation on different type of values, there would be three kinds of type conversion. Primitive conversion Number conversion String conversion There three type conversions have corresponding abstract operations in JavaScript: ToPrimitive(), ToNumber(), ToString(). For number additi...

   JAVASCRIPT,PROGRAMMING     2018-10-12 22:19:12

  Alibaba launches NASA program

On March 9, the China E-Commerce giant Alibaba held its first internal tech conference in its headquarter Hangzhou. During this conference, Jack Ma, Alibaba founder, announced a new program code named "NASA" which aims to build up technologies serving 2 billion people in next 20 years by forming independent and powerful R&D department. On March 13, Alibaba formerly announced this program to the public. The research area of this program would include machine learning, chi...

   ALIBABA,NASA,CHINA,NEWS     2017-03-13 11:32:22

  Life in Apple design team

While in mentioning about Apple, everyone of us will think of the amazing products shipped out by Apple such as iPhone and iPad. We are all impressed by its smooth design and handy user experience. But as a outsider do you know the story behind the amazing design of Apple? Apple has a team of world class designers and they are leading the fashion of design. What's the life in Apple's design team? Ben Williamson from Apple shared one story of him which can give us some hints on what the life is ...

   Apple,Design,Perfect     2014-01-02 07:00:27

  Tips for improving PHP efficiency

0. Using single quote to replace double quote to enclose string literal, this will be a bit faster. Because PHP engine will search variables in double quoted string. 1. If a method in class can be declared as static, then make it static, this will be 4 times faster. 2. $row["id"] is 7 times faster than $row[id] 3. echo is faster than print, and you should use multiple parameters instead of string concatenation, i.e use comma(,) instead of dot(.) to concatenate string. For example echo $str1,$str...

   PHP, efficiency, tips     2012-10-01 19:39:06

  Japanese Used Cars-Top Six Myths about Buying One in Russia

With the prices of brand new vehicles steadily increasing. Prospective car owners in Russia have started to move towards buying used vehicles. Being a reliable name in the automobile manufacturing world, Japanese used vehicles are playing a good contribution in fulfilling this increasing demand. Japanese used vehicles have become a major contributor to the overall trade of automotive industry. Keeping this fact in mind, it could be easily assumed that buying one should be a completely hassle-fr...

   JAPANESE USED CARS FOR SALE IN RUSSIA     2017-11-06 13:29:15

  PHP to output string to client terminal

It is a common task to echo messages to the user using PHP. There are lots of ways where the message can be echoed to the client terminal(browser or console window) through PHP. These includes some well know debug methods like var_dump() and var_export() etc. In this post, we will show you some other methods shared by Laruence, one of the core members of PHP development team. 1. echo First comes with the most common one : echo. $str = "Hello PHP\n"; echo $str; 2. print Then comes another c...

   TRICKS,DEBUG,OUTPUT,PHP     2015-10-01 03:16:56